##初始化菜单sql
## list
## type=0 文件夹， type=1，是url ，type=2是按钮
##parent_id=0是顶级菜单
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) 
VALUES ( 0, '${table.remarks}', '${moduleName}/${table.javaProperty}_list.html', '${moduleName}:${table.javaProperty}:query', 1, 'fa fa-cog', 0);

## add 
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) 
select m.menu_id,'${table.remarks}_新增', '', '${moduleName}:${table.javaProperty}:save', 2, null, 0
from `sys_menu` m where name='${table.remarks}';


## update 
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) 
select m.menu_id,'${table.remarks}_修改', '', '${moduleName}:${table.javaProperty}:update', 2, null, 0
from `sys_menu` m where name='${table.remarks}';


## delete 
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) 
select m.menu_id,'${table.remarks}_删除', '', '${moduleName}:${table.javaProperty}:delete', 2, null, 0
from `sys_menu` m where name='${table.remarks}';

